#region Using Statements
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace KLib.Physics.Collisions
{
    public struct Feature
    {
        #region Fields
        /// <summary>
        /// The Position of the Feature
        /// </summary>
        public Vector2 Position;

        /// <summary>
        /// The Normal of the Feature
        /// </summary>
        public Vector2 Normal;

        /// <summary>
        /// The Distance of the Feature
        /// </summary>
        public float Distance;
        #endregion

        #region Initialization

        /// <summary>
        /// Creates a new Feature at a specific position with a normal of (0,0) and a Distance of float.MaxValue
        /// </summary>
        /// <param name="position"></param>
        public Feature(Vector2 position)
        {
            this.Position = position;
            this.Normal = Vector2.Zero;
            this.Distance = float.MaxValue;
        }

        /// <summary>
        /// Creates a new feature with the specified position, normal and distance
        /// </summary>
        /// <param name="position">The position of the feature</param>
        /// <param name="normal">The normal of the feature</param>
        /// <param name="distance">The Distance of the feature</param>
        public Feature(Vector2 position, Vector2 normal, float distance)
        {
            this.Position = position;
            this.Normal = normal;
            this.Distance = distance;
        }
        #endregion
    }
}
